package com.xc.shopping_font.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName(value = "customer")
public class Customer implements Serializable {



    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    private String username;

    private String password;

    private String nickname;

    private String phone;

    @TableField("avatar_url")
    private String avatarUrl;



    @DateTimeFormat(pattern = "yyyy-MM-dd ")
    public Date getBirthday() {
        return birthday;
    }

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
    private Date birthday;
    //    @JsonFormat(pattern="yyyy-MM-dd ",timezone = "GMT+8")
//    @DateTimeFormat(pattern="yyyy-MM-dd ")


    private String city;

    private Integer status;

}
